<h2>Content pages</h2>
<script type="text/javascript">
    $('.scrollTable').dataTable({ "sPaginationType": "full_numbers", "bRetrieve": true });
</script>
    <table class="scrollTable">
        <thead>
            <tr>
                <th>Title</th>
                <th>Date added</th>
                <th>Author</th>
                <th>Last edited</th>
                <th>Type</th>
            </tr>
        </thead>
        <tbody>
            <? for($i=1; $i<=20; $i++) {
                if($i % 2) {
                    echo '<tr>';
                    echo '<td>Some partner</td>';
                    echo '<td>02-04-2011</td>';
                    echo '<td>A. Boot</td>';
                    echo '<td>03-04-2011</td>';
                    echo '<td>Contentpage</td>';
                    echo '</tr>';
                }
                else {
                    echo '<tr>';
                    echo '<td>Some other partner</td>';
                    echo '<td>A new page name</td>';
                    echo '<td>B. Buurman</td>';
                    echo '<td>11/05/2011</td>';
                    echo '<td>Contentpage</td>';
                    echo '</tr>';
                }
            } ?>
        </tbody>
    </table>


    <script type="text/javascript">
    function    switchPage() {
        $('#selectPage option').each(function() {
            $('#'+$(this).val()).hide();
        });

        $('#'+$('#selectPage').val()).show();
    }
    </script>
    <input type="button" class="button" value="Add" style="float:right;" onclick="showForm()"/>
    <div class="page">
        <form>
        <div class="pageFields">
            <label>Select a pagetype you wish to add:</label>
            <select name="selectPage" id="selectPage" onchange="switchPage()" >
                <option>--Select one--</option>
                <option value="welcomePage">Welcome page</option>
                <option value="contentPage">Content page</option>
            </select>
                <div id="welcomePage" style="display:none;">
                    <?$this->load->view('cms/welcomePage');?>
                </div>
                <div id="contentPage" style="display:none;">
                    <?$this->load->view('cms/contentPage');?>
                </div>
        </div>
        </form>
    <script type="text/javascript">
    function switchPage() {
        $('#selectPage option').each(function() {
            $('#'+$(this).val()).hide();
        });

        $('#'+$('#selectPage').val()).show();
    }
    </script>
    </div>
